<script setup>
import pageView from '@/views/quality/review/page.vue'
import modifyView from './modify.vue';
import removeView from './remove.vue';
import EXView from './ex.vue'
import { ref } from 'vue';

const pageref = ref(null)
const modref = ref(null)
const reref = ref(null)
const exref =ref(null)

// 修改方法
const userUpdate = (data)=>{
modref.value.userForm={...data}
modref.value.dialogVisible =true
}
// 增加
const userAdd = ()=>{
  modref.value.userForm={
  name:'',
  gender:'',
  phone:''
  }
  modref.value.dialogVisible = true
}
// 删除
const userdelete = (row)=>{
reref.value.deleteSubmit(row.id)
}

const review = (data) =>{
  exref.value.userForm = {...data}
  exref.value.dialogVisible = true
}

const refreshList = () => {
  pageref.value.handleSearch()
}
</script>
<template>

<pageView ref="pageref" @update="userUpdate" @add="userAdd" @delete="userdelete" @review="review"></pageView>
<modifyView ref="modref" @search="refreshList"></modifyView>
<removeView ref="reref" @search="refreshList"></removeView>
<EXView ref="exref" @search="refreshList" />
</template>
<style scoped></style>